package com.hua.base;

public class A {
    public void show(A obj){
        System.out.println("A.show(A)");
    }
    public void show(C obj){
        System.out.println("A.show(C)");
    }


    public static void main(String[] args) {
        A a = new A();
        B b = new B();
        C c = new C();
        D d = new D();
        a.show(a);
        a.show(b);
        b.show(c);
        b.show(d);
        A ba = new B();
        ba.show(c);
        ba.show(d);
    }
}


class B extends A{
    @Override
    public void show(A obj) {
        System.out.println("B.show(A)");
    }
}


class C extends B{

}
class D extends C{

}